<template>
    <div class="all-singer-song clearfix">
      <div class="title">单曲{{this.$route.params.songtotal}}</div>
      <SongList :showAlbum="true" :showSinger="false" :list="list"></SongList>
    </div>
</template>

<script>
  import SingerInfo from '@/components/Info/SingerInfo/SingerInfo'
  import SongList from '@/components/SongList/SongList'
  import {mapState} from 'vuex'
  export default {
        name: "AllSingerSong",
        data(){
          return{
            list:[]
          }
        },
        components:{
          SingerInfo,
          SongList,
        },
        computed:{
          ...mapState(['singerSong'])
        },
        mounted(){
          this.$store.dispatch('getSingerSong',{singer_mid:this.$route.params.mid,begin:0,num:this.$route.params.songtotal,order:'listen'})
        },
        watch:{
          singerSong(value){
            this.list=value.list
          }
        }
    }
</script>

<style scoped lang="less">
.all-singer-song{
  width: 1200px;
  margin: 30px auto;
  .title{
    font-size:24px;
    line-height: 2;
  }
}
</style>
